VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Add this Code To Hide\Show TaskBar

by Ihab Abu Hilal (4 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 31st January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Add this Code To Hide\Show TaskBar

API Declarations


'Insert 2 CommandButtons to your form (named Command1 and Command2).
'When you will press the First button the Taskbar will Disappear.
'To show the TaskBar again press the second button.
'Insert this code to the module :

Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40



Rate Add this Code To Hide\Show TaskBar




Private Sub Command1_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub

Private Sub Command2_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub


Download this snippet    Add to My Saved Code

Add this Code To Hide\Show TaskBar Comments

No comments have been posted about Add this Code To Hide\Show TaskBar. Why not be the first to post a comment about Add this Code To Hide\Show TaskBar.

Post your comment

Subject:
Message:
0/1000 characters